//
//  Engine.h
//  Simple
//
//  Created by Jeppe Nielsen on 1/3/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <OpenGLES/EAGL.h>
#import <OpenGLES/EAGLDrawable.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>


@interface Engine : UIWindow <UIApplicationDelegate> {
    
    GLint backingWidth;
    GLint backingHeight;
    
    EAGLContext *context;
    
    GLuint viewRenderbuffer, viewFramebuffer;
    
    GLuint depthRenderbuffer;
    
    GLuint spriteTexture;
    
    CADisplayLink* gameLoopTimer;
    
    
    
}

@property (strong, nonatomic) UIWindow *window;


-(id) init;
- (BOOL)createFramebuffer;

- (void)setupView;
- (void)drawView;

-(void)gameLoop;

@end
